package com.example.userservice.Controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: 故我
 * Date: 2024-02-12
 * Time: 21:37
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Value("${server.port}")
    private int port;

    @RequestMapping("/getname")
    public String getName() {
        return port + " | User-Server: " + new Random().nextInt(100);
    }
}
